package com.zhongyu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhongyu.pojo.Permission;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface PermissionMapper extends BaseMapper<Permission> {

@Select(" SELECT perm_code FROM smbms_permission WHERE id IN(\n" +
        "SELECT perm_id FROM smbms_role_permission WHERE\n" +
        " role_id=#{roleId})")
List<String> findPermCodes(@Param("roleId") Integer roleId);

}
